package util;

public class Judge {
    //判断一个数组中的元素种类个数
    public static int differentType(String[] array){
        int sum = 0;
        String[] unique_array;

        unique_array = Process.unique(array);
        sum = unique_array.length;

        return sum;
    }

    //比较两个数组里的值，若a不全大于b，则返回false
    public static boolean compare(int[] a,int[] b){
        int a_length = a.length;
        int b_length = b.length;

        if (a_length != b_length){
            System.out.println("两个数组的长度不同");
        }

        for(int i=0;i<a_length;i++){
            if(a[i] > b[i]){
                return false;
            }
        }
        return true;
    }

    //判断数组是否有重复内容
    public static boolean judgeIfRepeat(String[] a){
        String[] b = Process.unique(a);

        if (b.length!=a.length){
            return true;
        }else {
            return false;
        }
    }
}
